package studentCourseSystem;

public class Teacher {
    private String teacherId;
    private String name;
    private String gender;
    private Course taughtCourse;
    public Teacher(String teacherId, String name, String gender) {
        this.teacherId = teacherId;
        this.name = name;
        this.gender = gender;
    }
    public void teachCourse(Course course) {
        this.taughtCourse = course;
        course.setTeacher(this);
        System.out.println(name + "（教师）开始讲授课程：" + course.getCourseName());
    }
    public String getTeacherId() { return teacherId; }
    public void setTeacherId(String teacherId) { this.teacherId = teacherId; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getGender() { return gender; }
    public void setGender(String gender) { this.gender = gender; }

    public Course getTaughtCourse() { return taughtCourse; }
}
